<template>
  <ConfigProvider :locale="zhCN">
    <RouterView v-slot="{ Component }">
      <template v-if="Component">
        <KeepAlive>
          <component :is="Component" :key="route.fullPath" />
        </KeepAlive>
      </template>
    </RouterView>
  </ConfigProvider>
</template>

<script setup lang="ts">
import { ConfigProvider } from 'ant-design-vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'

import 'dayjs/locale/zh-cn'
import { useRoute } from 'vue-router'
const route = useRoute()
</script>

<style>
*,
ul,
li,
html,
body {
  padding: 0;
  margin: 0;
  list-style: none;
}

html,
body,
#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 5px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background-color: rgb(0 0 0 / 5%);
}

::-webkit-scrollbar-thumb {
  background-color: rgb(144 147 153 / 30%);
  border-radius: 2px;
  box-shadow: inset 0 0 6px rgb(0 0 0 / 20%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: #b6b7b9;
}
</style>
